package polymorphism;

/**
 * @description: ToDo
 * @author: marin
 * @time: 2020/7/3 19:51
 */
public class PolyTest {
    public static void main(String[] args) {
        PolyTest polyTest = new PolyTest();
        Dog dog = new Dog();
        polyTest.run(dog);
        Cat cat = new Cat();
        polyTest.run(cat);
    }

    public void run(Animal a){
        a.eat();
        a.sleep();
    }
}
